import { Application } from 'egg';

export default (app: Application) => {
  const mongoose = app.mongoose;
  const schema = new mongoose.Schema({
    // 名称
    name: {
      type: String,
      required: true,
    },
    // 别称
    alias: {
      type: String,
      required: true,
    },
    // 描述
    description: {
      type: String,
      required: true,
    },
    // 长
    width: {
      type: Number,
      required: true,
    },
    // 高
    height: {
      type: Number,
      required: true,
    },
    // 状态
    status: {
      type: Number,
      required: true,
      default: 0, // 1: 软删除
    },
  });
  return mongoose.model('Bannertype', schema, 'bannertype');
};
